<?php

/**
 * Description of Session
 *
 * @author miho
 */
class BluesCoders_Request_Http_Session {

    protected $_storage;

    /**
     *
     * @param BluesCoders_Request_Http_Session_IStorage $value
     * @return BluesCoders_Request_Http_Session 
     */
    public function setStorage(BluesCoders_Request_Http_Session_IStorage $value){
        $this->_storage = $value;
        return $this;
    }

    public function initialize() {
        if($this->_storage == null) {
            throw new Exception("No Session storage provided!");
        }

        $this->_storage->open();
    }

    public function  getObject($name) {
        return $this->_storage->getObject($name);
    }

    public function setObject($name, $value) {
        $this->_storage->setObject($name, $value);
        return $this;
    }
}
?>
